{
    "/api/v2/jobs/available": {
        "get": {
            "description": "Gets next scheduled job for client. \n\n<b>NOTE:</b> This endpoint is intended to be used by clients and may not function properly in the API Explorer.",
            "tags": [
                "Jobs",
                "Enterprise"
            ],
            "summary": "Get Next Jobs",
            "parameters": [
                {
                    "$ref": "#/definitions/parameters.PreferHeader"
                },
                {
                    "type": "string",
                    "description": "Sort by column. Can be used multiple times; prepend hyphen for descending order. Sortable columns are client_id, event_id, execution_time, status, start_time, end_time, log_path, domain_controller, event_title, last_ingest, id, created_at, updated_at, deleted_at.",
                    "name": "sort_by",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq",
                    "name": "log_path",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq",
                    "name": "session_collection",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq",
                    "name": "ad_structure_collection",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq",
                    "name": "domain_controller",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq",
                    "name": "status",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq",
                    "name": "event_title",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "client_id",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "event_id",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "execution_time",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "start_time",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "end_time",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "last_ingest",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "created_at",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "updated_at",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "deleted_at",
                    "in": "query",
                    "required": false
                }
            ],
            "responses": {
                "200": {
                    "description": "OK",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/definitions/api.ResponseWrapper"
                            }
                        }
                    }
                },
                "Error": {
                    "$ref": "#/components/responses/defaultError"
                }
            }
        }
    },
    "/api/v2/jobs/finished": {
        "get": {
            "description": "Gets all finished jobs",
            "tags": [
                "Jobs",
                "Enterprise"
            ],
            "summary": "Get Finished Jobs",
            "parameters": [
                {
                    "$ref": "#/definitions/parameters.PreferHeader"
                },
                {
                    "type": "string",
                    "description": "Sort by column. Can be used multiple times; prepend hyphen for descending order. Sortable columns are client_name, client_id, event_id, execution_time, status, start_time, end_time, log_path, domain_controller, event_title, last_ingest, id, created_at, updated_at, deleted_at.",
                    "name": "sort_by",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "client_id",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq",
                    "name": "rrule",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq",
                    "name": "session_collection",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq",
                    "name": "local_group_collection",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq",
                    "name": "ad_structure_collection",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "next_scheduled_at",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "id",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "created_at",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "updated_at",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "deleted_at",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Valid values are `true` or `false` and defaults to `true`. When a value of `true` is passed, any domains associated with each finished job will have expanded properties including `name` and `type`. When a value of `false` is passed, these same domains will only return as a list of `objectid`s.",
                    "name": "hydrate_domains",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Valid values are `true` or `false` and defaults to `true`. When a value of `true` is passed, any OUs associated with each finished job will have expanded properties including `name` and `type`. When a value of `false` is passed, these same OUs will only return as a list of `objectid`s.",
                    "name": "hydrate_ous",
                    "in": "query",
                    "required": false
                }
            ],
            "responses": {
                "200": {
                    "description": "OK",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/definitions/api.ResponseWrapper"
                            }
                        }
                    }
                },
                "Error": {
                    "$ref": "#/components/responses/defaultError"
                }
            }
        }
    },
    "/api/v2/clients/{client_id}/jobs": {
        "parameters": [
            {
                "type": "string",
                "description": "Client ID",
                "name": "client_id",
                "in": "path",
                "required": true
            }
        ],
        "post": {
            "description": "Creates a new scheduled job",
            "tags": [
                "Jobs",
                "Enterprise"
            ],
            "summary": "Creates a scheduled job",
            "parameters": [
                {
                    "$ref": "#/definitions/parameters.PreferHeader"
                }
            ],
            "requestBody": {
                "description": "The request body for creating a scheduled job",
                "required": true,
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/definitions/v2.CreateScheduledJobRequest"
                        }
                    }
                }
            },
            "responses": {
                "200": {
                    "description": "OK",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/definitions/api.ResponseWrapper"
                            }
                        }
                    }
                },
                "Error": {
                    "$ref": "#/components/responses/defaultError"
                }
            }
        }
    },
    "/api/v2/jobs": {
        "get": {
            "description": "Gets client jobs",
            "tags": [
                "Jobs",
                "Enterprise"
            ],
            "summary": "Get Jobs",
            "parameters": [
                {
                    "$ref": "#/definitions/parameters.PreferHeader"
                },
                {
                    "type": "string",
                    "description": "Sort by column. Can be used multiple times; prepend hyphen for descending order. Sortable columns are client_id, event_id, execution_time, status, start_time, end_time, log_path, domain_controller, event_title, last_ingest, id, created_at, updated_at, deleted_at.",
                    "name": "sort_by",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq",
                    "name": "log_path",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq",
                    "name": "session_collection",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq",
                    "name": "ad_structure_collection",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq",
                    "name": "domain_controller",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq",
                    "name": "status",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq",
                    "name": "event_title",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "client_id",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "event_id",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "execution_time",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "start_time",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "end_time",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "last_ingest",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "id",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "created_at",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "updated_at",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "string",
                    "description": "Filter results by column value. Valid filter predicates are eq, neq, gt, gte, lt, lte",
                    "name": "deleted_at",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "boolean",
                    "description": "Valid values are `true` or `false` and defaults to `true`. When a value of `true` is passed, any domains associated with each job will have expanded properties including `name` and `type`. When a value of `false` is passed, these same domains will only return as a list of `objectid`s.",
                    "name": "hydrate_domains",
                    "in": "query",
                    "required": false
                },
                {
                    "type": "boolean",
                    "description": "Valid values are `true` or `false` and defaults to `true`. When a value of `true` is passed, any OUs associated with each job will have expanded properties including `name` and `type`. When a value of `false` is passed, these same OUs will only return as a list of `objectid`s.",
                    "name": "hydrate_ous",
                    "in": "query",
                    "required": false
                }
            ],
            "responses": {
                "200": {
                    "description": "OK",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/definitions/api.ResponseWrapper"
                            }
                        }
                    }
                },
                "Error": {
                    "$ref": "#/components/responses/defaultError"
                }
            }
        }
    },
    "api/v2/jobs/current": {
        "get": {
            "description": "Get the status of the current client. Note: caller must be a client. For users, this endpoint will return a 404 as they are not expected or allowed to call this endpoint.",
            "tags": [
                "Jobs",
                "Enterprise"
            ],
            "summary": "Get client job status",
            "parameters": [
                {
                    "$ref": "#/definitions/parameters.PreferHeader"
                }
            ],
            "responses": {
                "200": {
                    "description": "OK",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/definitions/model.DisplayClientScheduledJob"
                            }
                        }
                    }
                },
                "Error": {
                    "$ref": "#/components/responses/defaultError"
                }
            }
        }
    },
    "/api/v2/jobs/start": {
        "post": {
          "description": "Endpoint for clients to start a new job and mark the start time. Note: caller must be a client. For users, this endpoint will return a 404 as they are not expected or allowed to call this endpoint.",
          "tags": [
            "Jobs",
            "Enterprise"
          ],
          "summary": "Notifies the API of a job start",
          "parameters": [
            {
                "$ref": "#/definitions/parameters.PreferHeader"
            }
          ],
          "requestBody": {
            "content": {
                "application/json": {
                    "schema": {
                        "properties": {
                            "id": {
                                "type": "integer"
                            }
                        }
                    }
                }
            }
          },
          "responses": {
            "200": {
              "description": "OK",
              "content": {
                "application/json": {
                    "schema": {
                        "$ref": "#/definitions/model.DisplayClientScheduledJob"
                      }
                }
              }
            },
            "Error": {
                "$ref": "#/components/responses/defaultError"
            }
          }
        }
    },
    "/api/v2/jobs/end": {
        "post": {
          "description": "Endpoint for clients to end a job and mark the end time. Note: caller must be a client. For users, this endpoint will return a 404 as they are not expected or allowed to call this endpoint.",
          "tags": [
            "Jobs",
            "Enterprise"
          ],
          "summary": "Notifies the API of a job ending",
          "parameters": [
            {
                "$ref": "#/definitions/parameters.PreferHeader"
            },
            {
                "in": "header",
                "name": "User-Agent",
                "type": "string",
                "required": true
            }
          ],
          "responses": {
            "200": {
                "description": "OK",
                "content": {
                  "application/json": {
                      "schema": {
                          "$ref": "#/definitions/model.DisplayClientScheduledJob"
                        }
                  }
                }
            },
            "Error": {
                "$ref": "#/components/responses/defaultError"
            }
          }
        }
      },
    "/api/v2/jobs/{job_id}": {
        "parameters": [
            {
                "type": "string",
                "description": "Job ID",
                "name": "job_id",
                "in": "path",
                "required": true
            }
        ],
        "get": {
            "description": "Gets client job",
            "tags": [
                "Jobs",
                "Enterprise"
            ],
            "summary": "Get Job",
            "parameters": [
                {
                    "$ref": "#/definitions/parameters.PreferHeader"
                }
            ],
            "responses": {
                "200": {
                    "description": "OK",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/definitions/api.ResponseWrapper"
                            }
                        }
                    }
                },
                "Error": {
                    "$ref": "#/components/responses/defaultError"
                }
            }
        }
    },
    "/api/v2/jobs/{job_id}/cancel": {
        "parameters": [
            {
                "type": "string",
                "description": "Job ID",
                "name": "job_id",
                "in": "path",
                "required": true
            }
        ],
        "put": {
            "description": "Sets a scheduled job to cancelled",
            "tags": [
                "Jobs",
                "Enterprise"
            ],
            "summary": "Cancels a scheduled job",
            "parameters": [
                {
                    "$ref": "#/definitions/parameters.PreferHeader"
                }
            ],
            "responses": {
                "200": {
                    "description": "OK",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/definitions/api.ResponseWrapper"
                            }
                        }
                    }
                },
                "Error": {
                    "$ref": "#/components/responses/defaultError"
                }
            }
        }
    },
    "/api/v2/jobs/{job_id}/log": {
        "parameters": [
            {
                "type": "string",
                "description": "Job ID",
                "name": "job_id",
                "in": "path",
                "required": true
            }
        ],
        "get": {
            "description": "Get the log file from a SharpHound run",
            "tags": [
                "Jobs",
                "Enterprise"
            ],
            "summary": "Get Job Log File",
            "parameters": [
                {
                    "$ref": "#/definitions/parameters.PreferHeader"
                }
            ],
            "responses": {
                "200": {
                    "description": "OK",
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/definitions/api.ResponseWrapper"
                            }
                        }
                    }
                },
                "Error": {
                    "$ref": "#/components/responses/defaultError"
                }
            }
        }
    }
}
